package com.xju.subjectsystem.service;

import com.xju.subjectsystem.mapper.StudentMapper;
import com.xju.subjectsystem.mapper.TeacherMapper;
import com.xju.subjectsystem.pojo.LoginInfo;
import com.xju.subjectsystem.pojo.Student;
import com.xju.subjectsystem.pojo.Teacher;

import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Map;

/**
 * -*- coding:utf-8 -*-
 *
 * @projectName: Subjectsystem
 * @package: com.xju.subjectsystem.service
 * @className: StudentService
 * @author: Eiard
 * @description: DONE : 学生服务端接口
 * @date: 2024-12-15 19:58
 */
public interface StudentService {

    /**
     * @methodName: selectByUsername
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 通过用户名查询
     * @author: Eiard
     * @date: 2024-12-11 14:46
     * @param: username  用户名
     * @return: Student
     */
    Student selectByUsername(String username);

    /**
     * @methodName: deleteByUsername
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 逻辑删除
     * @author: Eiard
     * @date: 2024-12-05 20:05
     * @param: username  用户名
     */
    void deleteByUsername(String username);

    /**
     * @methodName: add
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 添加学生(全参)
     * @author: Eiard
     * @date: 2024-12-05 17:33
     * @param: student
     */
    void add(Student student) throws NoSuchAlgorithmException;


    /**
     * @methodName: addSelective
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 选择添加(sno,spwd,sname)必须不为空
     * @author: Eiard
     * @date: 2024-12-15 20:08
     * @param: student
     */
    void addSelective(Student student) throws NoSuchAlgorithmException;

    /**
     * @methodName: batchAddStudents
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 批量添加学生
     * @author: Eiard
     * @date: 2024-12-15 20:08
     * @param: studentList
     * @return: Map<List < String>>
     */
    Map<String, List<String>> batchAddStudents(List<Student> studentList);

    /**
     * @methodName: update
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 所有字段修改
     * @author: Eiard
     * @date: 2024-12-15 20:09
     * @param: student
     */
    void update(Student student);

    /**
     * @methodName: updateSelective
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 可选字段更新
     * @author: Eiard
     * @date: 2024-12-15 20:09
     * @param: student
     */
    void updateSelective(Student student);

    /**
     * @methodName: updateStudent
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 更新密码、手机号、邮箱、微信、头像、家庭住址
     * @author: Eiard
     * @date: 2024-12-15 20:10
     * @param: student
     */
    void updateStudent(Student student);

    /**
     * @methodName: login
     * @package: com.xju.subjectsystem.service
     * @description: DONE : 登录返回信息
     * @author: Eiard
     * @date: 2024-12-15 20:11
     * @param: username     用户名或者手机号
     * @param: password
     * @return: LoginInfo
     */
    LoginInfo login(String username, String password) throws NoSuchAlgorithmException;

}
